home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global cSDSpriteBase, cSDDragSprite, gSDDragging, gSDBinPiece, gSDPuzzlePiece, gSDHelpUp, gSDNoPickUp
- set the exitLock to 1
- set cSDSpriteBase to 1
- set cSDDragSprite to 46
- set gSDDragging to 0
- set gSDNoPickUp to 0
- initPuzzle()
- initBin()
- set vHide to value(HSStateGet("sd2", "not1stTime"))
- put "vHide" && vHide
- if vHide then
- put "Duck1"
- set the visible of sprite 38 to 0
- set gSDHelpUp to 0
- else
- put "Duck2"
- fillBin()
- set gSDHelpUp to 1
- end if
- set vBin to HSStateGet("sd2", "bin")
- if listp(vBin) then
- set gSDBinPiece to vBin
- set vPuzzle to HSStateGet("sd2", "puzzle")
- set gSDPuzzlePiece to vPuzzle
- end if
- repeat with vI = cSDSpriteBase + 1 to cSDSpriteBase + 36
- puppetSprite(vI, 1)
- set the visible of sprite vI to 0
- end repeat
- puppetSprite(cSDDragSprite, 1)
- set the visible of sprite cSDDragSprite to 0
- PlaceBinPieces()
- PlacePuzzlePieces()
- EnableIdleAnim(44, 45)
- if PuzzleComplete() then
- SetCursor(#wait)
- set vInstalled to value(HSStateGet("sd", "installed"))
- if vInstalled then
- go("Finished")
- else
- go("Install2")
- end if
- end if
- end
-
- on cleanUp
- global gSDBinPiece, gSDPuzzlePiece
- DisableIdleAnim()
- HSStatePut("sd2", "bin", gSDBinPiece)
- HSStatePut("sd2", "puzzle", gSDPuzzlePiece)
- end
-
- on keyDown
- if the keyCode = 122 then
- LaunchHelp()
- end if
- end
-
- on NameToNum aName
- global cSDSpriteBase
- set vY to value(char 1 of aName)
- set vX to value(char 3 of aName)
- return ((vY - 1) * 6) + vX + cSDSpriteBase
- end
-